18.S996S13 Project: In search of a Monad

نویسندگان

  • Taesoo Kim
  • David Spivak
چکیده

For programmers, Monads are a well-known way to represent an abstract data structure, but without knowing its true nature. Admittedly, the definition of Monads in Category Theory is too subtle and obscure so makes people to avoid from trying to understand them. In this paper, we attempt to explore popular Monads in a purely functional programming language, Haskell, with a Category-theoretic mindset. Starting from the definition of Monads, we describe how they are defined and implemented in Haskell. In particular, we classify Monads by their implementation style, and it turns out that a common fallacy of using Monad metaphors can be understood in this vein. Also, we explain why IO Monad is particularly important in Haskell and what its role is, in a programmer’s perspective. Furthermore, we design a new Monad, called S Monad, in order to represent the system call abstractions, and shed light on a future Haskell OS using S Monad to represent the system call abstractions.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A cottage industry of lax extensions

In this work, we describe an adjunction between the comma category of Set-based monads under the V -powerset monad and the category of associative lax extensions of Set-based monads to the category of V -relations. In the process, we give a general construction of the Kleisli extension of a monad to the category of V-relations.

متن کامل

A Multi Objective Fibonacci Search Based Algorithm for Resource Allocation in PERT Networks

The problem we investigate deals with the optimal assignment of resources to the activities of a stochastic project network. We seek to minimize the expected cost of the project include sum of resource utilization costs and lateness costs. We assume that the work content required by the activities follows an exponential distribution. The decision variables of the model are the allocated resourc...

متن کامل

Applications of the Kleisli and Eilenberg-Moore 2-adjunctions

In 2010, J. Climent Vidal and J. Soliveres Tur developed, among other things, a pair of 2-adjunctions between the 2-category of adjunctions and the 2-category of monads. One is related to the Kleisli adjunction and the other to the Eilenberg-Moore adjunction for a given monad.Since any 2-adjunction induces certain natural isomorphisms of categories, these can be used to classify bijection...

متن کامل

Monad Transformers for Backtracking Search

This paper extends Escardó and Oliva’s selection monad to the selection monad transformer, a general monadic framework for expressing backtracking search algorithms in Haskell. The use of the closely related continuation monad transformer for similar purposes is also discussed, including an implementation of a DPLL-like SAT solver with no explicit recursion. Continuing a line of work exploring ...

متن کامل

ROBUST RESOURCE-CONSTRAINED PROJECT SCHEDULING WITH UNCERTAIN-BUT-BOUNDED ACTIVITY DURATIONS AND CASH FLOWS II. SOUNDS OF SILENCE: A NEW SAMPLING-BASED HYBRID PRIMARY-SECONDARY CRITERIA HARMONY SEARCH METAHEURISTIC

In this paper, we present a new idea for robust project scheduling combined with a cost-oriented uncertainty investigation. The result of the new approach is a makespan minimal robust proactive schedule, which is immune against the uncertainties in the activity durations and which can be evaluated from a cost-oriented point of view on the set of the uncertain-but-bounded duration and cost param...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013